<#include "../common/layout.ftl"/>
<@layout>
<div width="100%">
	<div class="dxfsqd_title">代驾员充值记录</div>
	<div class="dxfsqd_shearch">
	<form id="form1" method="post" action="/recharge" class="form-inline">
			<label><span>工号：</span><input type="text" class="input-medium" style="height: 30px" name="job_number" value="${job_number?if_exists}"/></label> 
			<label><span>姓名：</span><input type="text" class="input-medium" style="height: 30px"  name="real_name" value="${real_name?if_exists}"/></label> 
			<label><span>手机号码：</span><input type="text" class="input-medium" style="height: 30px"  name="cell_phone" value="${cell_phone?if_exists}"/></label> 
			<label><span>充值开始时间：</span><input type="text" class="input-medium" style="height: 30px"  name="start_time" value="${start_time!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/></label> 
			<label><span>结束时间：</span><input type="text" class="input-medium" style="height: 30px"  name="end_time" value="${end_time!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/></label> 
		<#if session.userRole == 'admin' || session.userRole == 'brandManager'>
			<button type="submit" class="btn"><i class="icon-search icon-white"></i>查询</button>
			<button type="button" class="btn btn-info" onclick="javascript:history.back();">返回</button>
		</#if>
		<#if session.userRole == 'admin' || session.userRole == 'brandManager'>
			<label><span>导出</span><a class="dc_exc"  href="#" onclick="excel()">导出Excel文件</a></label>
		</#if>
	</form>
  </div>

<div class="dxfsqd_table">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
		  	<th scope="col">ID</th>
		  	<th scope="col">登陆账号</th>
		    <th scope="col">工号</th>
			<th scope="col">真实姓名</th>
			<th scope="col">手机号码</th>
			<th scope="col">充值金额</th>
			<th scope="col">充值前金额</th>
			<th scope="col">充值类型</th>
			<th scope="col">充值时间</th>
			<th scope="col">操作人</th>
		  </tr>
		</thead>
		<tbody>
		<#list page.list as recharge>
		  <tr>
		  	<td>
			  ${recharge.id!""}
			</td>
			<td>
			  ${recharge.phone!""}
			</td>
		    <td>
			  ${recharge.job_number!""}
			</td>
			<td>
			  ${recharge.name!""}
			</td>
			<td>
			  ${recharge.phone!""}  
			</td>
			<td>
			  ￥${recharge.money?string(",##0.00")}
			</td>
			<td>
				 <#if recharge.before_balance??> 
			  		￥${recharge.before_balance?string(",##0.00")}
			  	</#if>
			</td>
			<td>
			  <#if recharge.recharge_type == 0>
			  	<span class="label label-info">现金</span>
			  <#elseif recharge.recharge_type == 1>
			  	<span class="label label-warning">网银</span>
			  <#elseif recharge.recharge_type == 2>
			  	<span class="label label-success">支票</span>
		  	 <#elseif recharge.recharge_type == 3>
			  	<span class="label label-success">微信</span>
			  <#else>
			  	<span class="label label-inverse">其他</span>
			  </#if>
			</td>
			<td>
				 <#if recharge.time??> 
			     ${recharge.time?string("yyyy-MM-dd HH:mm:ss") }  
			    </#if>
			</td>
			<td>
				${recharge.sysUserName!""}
			</td>
			
		  </tr>
		</#list>
		</tbody>
	</table>  
	<#include "../common/paginate.ftl" />
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/recharge/"  urlParas="?job_number=${job_number?if_exists}&real_name=${real_name?if_exists }&cell_phone=${cell_phone?if_exists }&start_time=${start_time?if_exists }&end_time=${end_time?if_exists }"/>
</div>
</div>
<script type="text/javascript" src="/js/wdatePicker/WdatePicker.js"></script>
 <script>
function excel() {
  document.getElementById('form1').action= '/recharge/excel';
  document.getElementById('form1').submit();
}
</script>        
</@layout>